home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmConnectionProperties
- BorderStyle = 1 'Fixed Single
- Caption = "Connection Properties"
- ClientHeight = 3720
- ClientLeft = 1128
- ClientTop = 1608
- ClientWidth = 6432
- Height = 4092
- Left = 1080
- LinkTopic = "Form2"
- ScaleHeight = 3720
- ScaleWidth = 6432
- Top = 1284
- Width = 6528
- Begin HScrollBar hscLineWidth
- Height = 195
- Left = 1200
- Max = 100
- TabIndex = 41
- Top = 3360
- Width = 1455
- End
- Begin TextBox edtLineWidth
- Height = 285
- Left = 2700
- MaxLength = 3
- TabIndex = 40
- Text = "0"
- Top = 3300
- Width = 555
- End
- Begin Frame Frame2
- Caption = "Alignment"
- Height = 1092
- Index = 1
- Left = 4920
- TabIndex = 36
- Top = 2100
- Width = 1452
- Begin OptionButton btnTextPosH
- Caption = "Left"
- Height = 252
- Index = 0
- Left = 180
- TabIndex = 39
- Top = 300
- Width = 792
- End
- Begin OptionButton btnTextPosH
- Caption = "Center"
- Height = 252
- Index = 1
- Left = 180
- TabIndex = 38
- Top = 540
- Value = -1 'True
- Width = 852
- End
- Begin OptionButton btnTextPosH
- Caption = "Right"
- Height = 252
- Index = 2
- Left = 180
- TabIndex = 37
- Top = 780
- Width = 852
- End
- End
- Begin TextBox edtConnectionId
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 312
- Left = 1380
- TabIndex = 34
- TabStop = 0 'False
- Top = 1800
- Width = 732
- End
- Begin ComboBox cmbConnectionArrow
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 288
- Left = 1620
- Style = 2 'Dropdown List
- TabIndex = 8
- Top = 2880
- Width = 3192
- End
- Begin PictureBox pctConnectionColor
- BackColor = &H0000FFFF&
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 4680
- ScaleHeight = 168
- ScaleWidth = 168
- TabIndex = 31
- Top = 1800
- Width = 192
- End
- Begin TextBox edtConnectionData
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 312
- Left = 3720
- TabIndex = 28
- TabStop = 0 'False
- Top = 1800
- Width = 732
- End
- Begin TextBox edtConnectionLabel
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 672
- Left = 1560
- MultiLine = -1 'True
- TabIndex = 26
- TabStop = 0 'False
- Top = 2160
- Width = 3252
- End
- Begin Frame Frame2
- Caption = "To"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 1692
- Index = 0
- Left = 3240
- TabIndex = 15
- Top = 60
- Width = 3132
- Begin TextBox edtConnectToIndex
- Enabled = 0 'False
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 312
- Left = 2160
- TabIndex = 20
- TabStop = 0 'False
- Top = 180
- Width = 852
- End
- Begin TextBox edtConnectToHandle
- Enabled = 0 'False
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 312
- Left = 2160
- TabIndex = 19
- TabStop = 0 'False
- Top = 540
- Width = 852
- End
- Begin TextBox edtToItemId
- Enabled = 0 'False
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 312
- Left = 720
- TabIndex = 18
- TabStop = 0 'False
- Top = 900
- Width = 672
- End
- Begin TextBox edtToItemData
- Enabled = 0 'False
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 312
- Left = 2340
- TabIndex = 17
- TabStop = 0 'False
- Top = 900
- Width = 672
- End
- Begin TextBox edtToList
- Enabled = 0 'False
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 312
- Left = 540
- TabIndex = 16
- TabStop = 0 'False
- Top = 1260
- Width = 2472
- End
- Begin Label Label10
- Alignment = 1 'Right Justify
- Caption = "ConnectionToIndex:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 180
- TabIndex = 25
- Top = 240
- Width = 1932
- End
- Begin Label Label9
- Alignment = 1 'Right Justify
- Caption = "ConnectionToHandle:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 120
- TabIndex = 24
- Top = 600
- Width = 1992
- End
- Begin Label Label8
- Caption = "ItemId:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 120
- TabIndex = 23
- Top = 960
- Width = 552
- End
- Begin Label Label7
- Caption = "ItemData:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 1500
- TabIndex = 22
- Top = 960
- Width = 792
- End
- Begin Label Label6
- Caption = "List:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 120
- TabIndex = 21
- Top = 1320
- Width = 372
- End
- End
- Begin Frame Frame1
- Caption = "From"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 1692
- Left = 60
- TabIndex = 3
- Top = 60
- Width = 3132
- Begin TextBox edtFromList
- Enabled = 0 'False
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 312
- Left = 540
- TabIndex = 13
- TabStop = 0 'False
- Top = 1260
- Width = 2472
- End
- Begin TextBox edtFromItemData
- Enabled = 0 'False
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 312
- Left = 2340
- TabIndex = 11
- TabStop = 0 'False
- Top = 900
- Width = 672
- End
- Begin TextBox edtFromItemId
- Enabled = 0 'False
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 312
- Left = 720
- TabIndex = 9
- TabStop = 0 'False
- Top = 900
- Width = 672
- End
- Begin TextBox edtConnectFromHandle
- Enabled = 0 'False
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 312
- Left = 2160
- TabIndex = 6
- TabStop = 0 'False
- Top = 540
- Width = 852
- End
- Begin TextBox edtConnectFromIndex
- Enabled = 0 'False
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 312
- Left = 2160
- TabIndex = 4
- TabStop = 0 'False
- Top = 180
- Width = 852
- End
- Begin Label Label5
- Caption = "List:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 120
- TabIndex = 14
- Top = 1320
- Width = 372
- End
- Begin Label Label4
- Caption = "ItemData:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 1500
- TabIndex = 12
- Top = 960
- Width = 792
- End
- Begin Label Label3
- Caption = "ItemId:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 120
- TabIndex = 10
- Top = 960
- Width = 552
- End
- Begin Label Label1
- Alignment = 1 'Right Justify
- Caption = "ConnectionFromHandle:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 195
- Left = 60
- TabIndex = 7
- Top = 600
- Width = 2055
- End
- Begin Label Label2
- Alignment = 1 'Right Justify
- Caption = "ConnectionFromIndex:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 180
- TabIndex = 5
- Top = 240
- Width = 1932
- End
- End
- Begin CommandButton cmdCancel
- Cancel = -1 'True
- Caption = "&Cancel"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 372
- Left = 5400
- TabIndex = 2
- TabStop = 0 'False
- Top = 3300
- Width = 972
- End
- Begin CommandButton cmdDelete
- Caption = "&Delete"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 372
- Left = 3360
- TabIndex = 1
- TabStop = 0 'False
- Top = 3300
- Width = 972
- End
- Begin CommandButton cmdAccept
- Caption = "&Accept"
- Default = -1 'True
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 372
- Left = 4380
- TabIndex = 0
- TabStop = 0 'False
- Top = 3300
- Width = 972
- End
- Begin CommonDialog CMDialog1
- CancelError = -1 'True
- Filter = "ITGraph Files (*.ITG)|*.ITG"
- FilterIndex = 1
- Left = 420
- Top = 2460
- End
- Begin Label lblLineWidth
- Alignment = 1 'Right Justify
- Caption = "LineWidth:"
- Height = 192
- Left = 180
- TabIndex = 42
- Top = 3360
- Width = 972
- End
- Begin Label Label15
- Alignment = 1 'Right Justify
- Caption = "ConnectionId:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 60
- TabIndex = 35
- Top = 1860
- Width = 1212
- End
- Begin Label txtNewConnection
- Caption = "txtNewConnection"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 60
- TabIndex = 33
- Top = 3120
- Visible = 0 'False
- Width = 1692
- End
- Begin Label Label14
- Alignment = 1 'Right Justify
- Caption = "ConnectionArrow:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 60
- TabIndex = 30
- Top = 2940
- Width = 1512
- End
- Begin Label Label13
- Caption = "ConnectionColor"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 4920
- TabIndex = 32
- Top = 1800
- Width = 1452
- End
- Begin Label Label12
- Alignment = 1 'Right Justify
- Caption = "ConnectionData:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 2220
- TabIndex = 29
- Top = 1860
- Width = 1392
- End
- Begin Label Label11
- Caption = "ConnectionLabel:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Dialog"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 60
- TabIndex = 27
- Top = 2220
- Width = 1452
- End
- Sub cmdAccept_Click ()
- Dim fromIx%, toIx%
- fromIx = Val(edtConnectFromIndex.Text)
- toIx = Val(edtConnectToIndex.Text)
- frmPlayground!ITGraph1.ConnectTo(fromIx) = toIx
- frmPlayground!ITGraph1.ConnectFromHandle = Val(edtConnectFromHandle.Text)
- frmPlayground!ITGraph1.ConnectToHandle = Val(edtConnectToHandle.Text)
- frmPlayground!ITGraph1.ConnectionData = Val(edtConnectionData.Text)
- frmPlayground!ITGraph1.ConnectionColor = pctConnectionColor.BackColor
- frmPlayground!ITGraph1.ConnectionArrow = cmbConnectionArrow.ListIndex
- If edtLineWidth.Text = "" Then
- frmPlayground!ITGraph1.ConnectionLineWidth = -1
- Else
- frmPlayground!ITGraph1.ConnectionLineWidth = Val(edtLineWidth.Text)
- End If
- frmPlayground!ITGraph1.ConnectionLabel = edtConnectionLabel.Text
- textPos = 0
- For i = 0 To 2
- If btnTextPosH(i).Value Then
- textPos = textPos + i
- End If
- Next i
- frmPlayground!ITGraph1.ConnectionAlign = textPos
- frmPlayground.Enabled = True
- frmConnectionProperties.Hide
- End Sub
- Sub cmdCancel_Click ()
- frmPlayground.Enabled = True
- frmConnectionProperties.Hide
- End Sub
- Sub cmdDelete_Click ()
- Dim fromIx%, toIx%
- fromIx = Val(edtConnectFromIndex.Text)
- toIx = Val(edtConnectToIndex.Text)
- frmPlayground!ITGraph1.RemoveFrom(fromIx) = toIx
- frmPlayground.Enabled = True
- frmConnectionProperties.Hide
- End Sub
- Sub edtLineWidth_Change ()
- If edtLineWidth.Text <> "" Then
- hscLineWidth.Value = Val(edtLineWidth.Text)
- End If
- End Sub
- Sub Form_Activate ()
- Dim fromIx%, toIx%
- fromIx = Val(edtConnectFromIndex.Text)
- toIx = Val(edtConnectToIndex.Text)
- edtFromItemId.Text = Format$(frmPlayground!ITGraph1.ItemId(fromIx))
- edtFromItemData.Text = Format$(frmPlayground!ITGraph1.ItemData(fromIx))
- edtFromList.Text = frmPlayground!ITGraph1.List(fromIx)
- edtToItemId.Text = Format$(frmPlayground!ITGraph1.ItemId(toIx))
- edtToItemData.Text = Format$(frmPlayground!ITGraph1.ItemData(toIx))
- edtToList.Text = frmPlayground!ITGraph1.List(toIx)
- If txtNewConnection.Caption = "NEW" Then
- Me.Caption = "New Connection Properies"
- edtConnectionLabel.Text = ""
- edtConnectionId.Text = "????"
- edtConnectionData.Text = "0"
- cmbConnectionArrow.ListIndex = ITG_AHSolid
- pctConnectionColor.BackColor = frmPlayground!ITGraph1.ForeColor
- edtLineWidth.Text = ""
- btnTextPosH(1).Value = True
- cmdDelete.Visible = False
- Else
- Me.Caption = "Connection Properties"
- frmPlayground!ITGraph1.ConnectTo(fromIx) = toIx
- edtConnectFromHandle.Text = Format$(frmPlayground!ITGraph1.ConnectFromHandle)
- edtConnectToHandle.Text = Format$(frmPlayground!ITGraph1.ConnectToHandle)
- edtConnectionLabel.Text = frmPlayground!ITGraph1.ConnectionLabel
- edtConnectionId.Text = Format$(frmPlayground!ITGraph1.ConnectionId)
- edtConnectionData.Text = Format$(frmPlayground!ITGraph1.ConnectionData)
- cmbConnectionArrow.ListIndex = frmPlayground!ITGraph1.ConnectionArrow
- If frmPlayground!ITGraph1.ConnectionColor <> -1 Then
- pctConnectionColor.BackColor = frmPlayground!ITGraph1.ConnectionColor
- Else
- pctConnectionColor.BackColor = frmPlayground!ITGraph1.ForeColor
- End If
- If frmPlayground!ITGraph1.ConnectionLineWidth <> -1 Then
- edtLineWidth.Text = Str$(frmPlayground!ITGraph1.ConnectionLineWidth)
- Else
- edtLineWidth.Text = ""
- End If
- btnTextPosH(frmPlayground!ITGraph1.ConnectionAlign Mod 3).Value = True
- cmdDelete.Visible = True
- End If
- edtConnectionLabel.SetFocus
- End Sub
- Sub Form_Load ()
- cmbConnectionArrow.Clear
- cmbConnectionArrow.AddItem "ITG_AHNone"
- cmbConnectionArrow.AddItem "ITG_AHSolid"
- cmbConnectionArrow.AddItem "ITG_AHHollow"
- cmbConnectionArrow.AddItem "ITG_AHOutline"
- cmbConnectionArrow.AddItem "ITG_AHSolidCircle"
- cmbConnectionArrow.AddItem "ITG_AHHollowCircle"
- End Sub
- Sub hscLineWidth_Change ()
- edtLineWidth.Text = hscLineWidth.Value
- End Sub
- Sub pctConnectionColor_Click ()
- Const CC_RGBINIT = &H1&
- On Error GoTo pctConnectionColor_Error
- CMDialog1.Color = pctConnectionColor.BackColor
- CMDialog1.Flags = CC_RGBINIT
- CMDialog1.Action = 3
- pctConnectionColor.BackColor = CMDialog1.Color
- pctConnectionColor_Error:
- Exit Sub
- End Sub
-